package com.bgIntlgn.client.entity.jishubu;

import yuhuibear.poat.annotations.relation.View;
import yuhuibear.poat.object.bean.Bean;

@View(name = "elementSubversion_view", sqlToCreate = "select unit_view.unit as unit, elements_view.id as elementid, elements_view.elementname as elementname, elements_view.typename as typename, es.uid as uid, "
		+ "es.valid as valid, materials.name as materialname, paper_view.paperno as paperno , implementMethod_view.name as implementmethodname, es.spec as spec "
		+ "from (element_subversions as es left outer join  paper_view on es.uid=paper_view.uid), "
		+ "(select e.id as id, e.name as elementname, d.name as typename "
		+ "from elements as e, dictionarys as d where e.type = d.id) as elements_view, "
		+ "(select e.id as id, d.name as unit "
		+ "from elements as e, dictionarys as d where e.unit = d.id and e.oem=false) as unit_view, "
		+ "implementMethod_view, materials, element_catalogs "
		+ "where unit_view.id=elements_view.id and elements_view.id=es.element_id and es.material_id=materials.id and  es.impl_method=implementMethod_view.id and element_catalogs.uid=es.uid")
public class ElementSubversionView implements Bean {

	// Element
	private Long elementid;
	private String elementname;
	private String typename;
	private String unit;

	// ElementSubversion
	private String uid;
	private boolean valid;
	private String materialname;
	private String implementmethodname;
	private String spec;

	// Paper
	private Long paperno;

	public Long getElementid() {
		return elementid;
	}

	public void setElementid(Long elementid) {
		this.elementid = elementid;
	}

	public String getImplementmethodname() {
		return implementmethodname;
	}

	public void setImplementmethodname(String implementmethodname) {
		this.implementmethodname = implementmethodname;
	}

	public String getElementname() {
		return elementname;
	}

	public void setElementname(String elementname) {
		this.elementname = elementname;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public String getTypename() {
		return typename;
	}

	public void setTypename(String typename) {
		this.typename = typename;
	}

	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public boolean isValid() {
		return valid;
	}

	public void setValid(boolean valid) {
		this.valid = valid;
	}

	public String getMaterialname() {
		return materialname;
	}

	public void setMaterialname(String materialname) {
		this.materialname = materialname;
	}

	public Long getPaperno() {
		return paperno;
	}

	public void setPaperno(Long paperno) {
		this.paperno = paperno;
	}

	public String getSpec() {
		return this.spec;
	}

	public void setSpec(String spec) {
		this.spec = spec;
	}
}
